﻿<?xml version="1.0" encoding="UTF-8" ?>
<schema xmlns:maa="http://www.maaamet.ee/" xmlns:xtee="http://x-tee.riik.ee/xsd/xtee.xsd"
	xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	targetNamespace="http://www.maaamet.ee/" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<element name="tehingudtest" type="maa:tehingudtestParingIseType">
		<annotation>
			<appinfo>
				<xtee:title>Tehingute andmed kinnisasja tehingute jaoks Notariaalregistrist</xtee:title>
			</appinfo>
		</annotation>
	</element>
	<element name="tehingudtestResponse" type="maa:tehingudtestVastusIseType" />
	<complexType name="tehingudtestParingIseType">
		<sequence>
			<element name="keha" type="maa:tehingudtestParingType" />
		</sequence>
	</complexType>
	<complexType name="tehingudtestVastusIseType">
		<sequence>
			<element name="paring" type="maa:tehingudtestParingType" />
			<element name="keha" type="maa:tehingudtestVastusType" />
		</sequence>
	</complexType>
	<complexType name="tehingudtestParingType">
		<annotation>
			<appinfo>
				<xtee:title>tehingud</xtee:title>
			</appinfo>
		</annotation>
		<sequence minOccurs="1" maxOccurs="unbounded">
			<element name="tehing">
				<complexType>
					<sequence>
						<element name="tehinguNR">
							<simpleType>
								<restriction base="normalizedString">
									<minLength value="1" />
									<maxLength value="12" />
								</restriction>
							</simpleType>
						</element>
						<element name="summa" type="nonNegativeInteger" />
						<element name="tunnused" type="token">
							<annotation>
								<documentation>Katastritunnuste vi kinnistu numbrite loetelu vastavas formaadis </documentation>
							</annotation>
						</element>
						<element name="omandiosa" type="positiveInteger" />
						<element name="osadest" type="positiveInteger" />
						<element name="kuupaev" type="date" />
						<element name="objektiLiik">
							<simpleType>
								<restriction base="string">
									<enumeration value="HOIG" />
									<enumeration value="KASI" />
									<enumeration value="KHOI" />
									<enumeration value="KOM" />
								</restriction>
							</simpleType>
						</element>
						<element name="tehinguLiik">
							<simpleType>
								<restriction base="string">
									<enumeration value="KINK" />
									<enumeration value="MUUT" />
									<enumeration value="OSTM" />
									<enumeration value="VAHE" />
								</restriction>
							</simpleType>
						</element>
						<element name="hoonestatud">
							<simpleType>
								<restriction base="string">
									<enumeration value="J" />
									<enumeration value="E" />
								</restriction>
							</simpleType>
						</element>
						<element name="notar" minOccurs="0">
							<simpleType>
								<restriction base="normalizedString">
									<minLength value="1" />
									<maxLength value="11" />
								</restriction>
							</simpleType>
						</element>
						<element name="residentinfo">
								<complexType>
									<sequence>
										<element name="residendid" type="maa:residentType" minOccurs="0" maxOccurs="unbounded" />
									</sequence>
								</complexType>
						</element>
					</sequence>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="tehingudtestVastusType">
		<sequence minOccurs="0" maxOccurs="unbounded">
			<element name="salvestamiseTulem">
				<complexType>
					<sequence>
						<element name="tehinguNR" type="normalizedString">
							<annotation>
								<appinfo>
									<xtee:title>Tehingu number</xtee:title>
								</appinfo>
							</annotation>
						</element>
						<element name="viga" type="string">
							<annotation>
								<appinfo>
									<xtee:title>Veatekst</xtee:title>
								</appinfo>
							</annotation>
						</element>
					</sequence>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<complexType name="residentType">
		<sequence>
			<element name="tunnus">
				<simpleType>
					<restriction base="string">
						<enumeration value="O" />
						<enumeration value="M" />
					</restriction>
				</simpleType>
			</element>
			<element name="isikuLiik" type="maa:isikudType" />
			<element name="riik">
				<simpleType>
					<restriction base="normalizedString">
						<length value="3" />
					</restriction>
				</simpleType>
			</element>
			<element name="osakaalLugeja" type="positiveInteger" />
			<element name="osakaalNimetaja" type="positiveInteger" />
		</sequence>
	</complexType>
	 
</schema>
